<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,user-scalable=no,minimal-ui">
        <title>支付成功</title>
        <link rel="icon" href="../images/zhifu_weixin.png">
        <!--不同屏幕尺寸根字体设置-->
        <script src="./../js/base.js"></script>
        <!--element-ui的样式-->
        <link rel="stylesheet" href="../../back/plugins/element-ui/index.css" />
        <!-- 引入样式  -->
        <link rel="stylesheet" href="../styles/index.css" />
        <!--本页面内容的样式-->
        <link rel="stylesheet" href="./../styles/pay-success.css" />
        <link rel="stylesheet" href="../styles/main.css" />
    </head>
    <body>
        <div id="pay_success" class="app">
<!--            <div class="divHead">-->
<!--                <div class="divTitle">-->
<!--                    <i class="el-icon-arrow-left" @click="goBack"></i>-->
<!--                    -->
<!--                    <img src="./../images/home.png" @click="toMainPage"/>-->
<!--                </div>-->
<!--            </div>-->
            <div class="divContent">
                <img src="./../images/zhifu_weixin.png"/>
                <div class="divSuccess">支付成功</div>
<!--                <div class="divDesc">预计{{finishTime}}到达</div>-->
                <div class="divDesc1" style="font-size: 17rem;font-weight: 400;margin-top: 57rem;height: 20rem;margin-left: -5rem">蜜雪冰城</div>
                <div class="divDesc">￥{{amount}}</div>

                <div class="btnView" @click="goBack">完成</div>
            </div>
<!--            <div class="divFoot" style="border-top: #bdbdbd 2px solid"> <span class="foot" @click="toIndexPage" style="margin-left: 30rem"><i class="el-icon-s-home" style="font-size: 28rem"></i>首页 </span><span class="foot" @click="toMenuPage" style="color: red"><i class="el-icon-shopping-bag-1-->
<!--" style="font-size: 27rem"></i>点餐</span><span class="foot" @click="toMesPage"><i class="el-icon-chat-dot-round" style="font-size: 27rem"></i> 消息</span><span class="foot" @click="toUserPage"><i class="el-icon-user" style="font-size: 27rem"></i>我的</span></div>-->
        </div>
        <!-- 开发环境版本，包含了有帮助的命令行警告 -->
        <script src="../../back/plugins/vue/vue.js"></script>
        <!-- 引入组件库 -->
        <script src="../../back/plugins/element-ui/index.js"></script>
        <!-- 引入axios -->
        <script src="../../back/plugins/axios/axios.min.js"></script>
        <script src="./../js/request.js"></script>
        <script>
        new Vue({
            el:"#pay_success",
            data(){
                return {
                    finishTime:'',
                    amount:''
                }
            },
            computed:{},
            created(){
                this.getFinishTime()
                this.toGetAmount()
            },
            mounted(){},
            methods:{
                goBack(){
                    window.location.href= '/front/page/menu.html'
                },

                toMenuPage(){
                    window.requestAnimationFrame(()=>{
                        window.location.href= '/front/page/menu.html'
                    })
                },

                //获取送达时间
                getFinishTime(){
                    let now = new Date()
                    let hour = now.getHours() +1
                    let minute = now.getMinutes()
                    if(hour.toString().length <2){
                        hour = '0' + hour
                    }
                    if(minute.toString().length <2){
                        minute = '0' + minute
                    }
                    this.finishTime = hour + ':' + minute
                },
                toGetAmount() {
                    var url=window.location .href;
                    var aa=url.indexOf("=");
                    if (aa === -1)
                        return "";
                    url=url.substring(aa+1);
                    this.amount=url
                }

            }
        })
        </script>
    </body>
</html>